package com.zhangwei.zk1018.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author admin
 * @since 2021-10-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Goods extends Model<Goods> {



    private static final long serialVersionUID=1L;

    @TableId(value = "gid", type = IdType.AUTO)
    private Integer gid;

    private String gname;

    private Double gprice;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date gtime;

    private Integer tid;

    @TableField(exist = false)
    private  String tname;


    @Override
    protected Serializable pkVal() {
        return this.gid;
    }

}
